x86: Support compiling with indirect branch thunks
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 18 Dec 2017 13:54:25 +0000 (13:54 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 16 Jan 2018 17:45:50 +0000 (17:45 +0000)
commit3659f0f4bcc6ca08103d1a7ae4e97535ecc978be
tree5106e71fd4d2571b5b1c7e869fc965ddd2088557
parente871e80c38547d9faefc6604532ba3e985e65873
x86: Support compiling with indirect branch thunks

Use -mindirect-branch=thunk-extern/-mindirect-branch-register when available.
To begin with, use the retpoline thunk.  Later work will add alternative
thunks which can be selected at boot time.

This is part of XSA-254.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/Makefile
xen/arch/x86/Rules.mk
xen/arch/x86/indirect-thunk.S [new file with mode: 0644]
xen/arch/x86/xen.lds.S